find a lexicographically smallest string